//package com.dji.sample.wayline.controller.client;
//
//import com.dji.sample.wayline.model.dto.PublisFlightTaskDTO;
//import com.dji.sample.wayline.service.IFlightTaskService;
//import com.dji.sample.wayline.service.IWaylineFileService;
//import com.dji.sdk.cloudapi.wayline.GetWaylineListResponse;
//import com.dji.sdk.common.HttpResultResponse;
//import org.checkerframework.checker.units.qual.A;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.sql.SQLException;
//import java.util.Optional;
//
//@RestController("/api")
//public class OutSideInterface {
//
//    @Autowired
//    IFlightTaskService flightTaskService;
//
//    @Autowired
//    IWaylineFileService waylineFileService;
//
//    @PostMapping("/publishFlightTask")
//    public HttpResultResponse publishFlightTask(@RequestBody PublisFlightTaskDTO dto) throws SQLException {
//        flightTaskService.publishFlightTask(dto.getCreateJobParam(), dto.getCustomClaim());
//        return HttpResultResponse.success();
//    }
//
//    @GetMapping("/getWorkSpaceWaylineByWaylineId/{workspaceId}/{waylineId}")
//    public HttpResultResponse<GetWaylineListResponse> getWorkSpaceWaylineByWaylineId(@PathVariable String workspaceId, @PathVariable String waylineId) throws SQLException {
//        Optional<GetWaylineListResponse> waylineFileResponse = waylineFileService.getWaylineByWaylineId(workspaceId, waylineId);
//        if (waylineFileResponse.isPresent()) {
//            return HttpResultResponse.success(waylineFileResponse.get());
//        }
//        return HttpResultResponse.error("wayline not found");
//    }
//}
